<template>
  <div ref="chartDom" style="width: 25vw; height: 20vw;background-color: #071526;font-weight: bold"></div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import * as echarts from 'echarts';

const chartDom = ref(null);

onMounted(() => {
  const myChart = echarts.init(chartDom.value, null, {
    renderer: 'svg'
  });

  const option = {
    xAxis: {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        data: [150, 230, 224, 218, 135, 147, 260],
        type: 'line'
      }
    ]
  };

  myChart.setOption(option);
});
</script>

<style scoped>
/* 可以在这里添加一些样式 */
</style>